import vision
import locateGoalzor
import time



visionID = vision.subscribe()
def run():
    (image, headinfo) = vision.snapShot(visionID)
    #locateGoalzor.cv.SaveImage('input.png',im)
    headyaw = headinfo[1][0]
    blob = locateGoalzor.run(image, headyaw, 'blue')
    print blob
'''
def bench():
    time = 0
    itterations = 50
    for i in range(itterations):
        (timer,blob) = run()
        time = time + timer
    print blob
    print time/itterations
'''
def test():
    tic = time.time()
    run()
    print time.time() - tic